var listTable = new Object;
listTable.selectAll = function(obj, chk) {
    if (chk == null) {
        chk = 'checkboxes';
    }
    var elems = obj.form.getElementsByTagName("INPUT");
    for (var i = 0; i < elems.length; i++) {
        if (elems[i].name == chk || elems[i].name == chk + "[]") {
            elems[i].checked = obj.checked;
        }
    }
};
listTable.anyChecked = function(theForm, chk) {
    if (chk == null) {
        chk = 'checkboxes';
    }
    var elems = theForm.getElementsByTagName("INPUT");
    for (var i = 0; i < elems.length; i++) {
        if (elems[i].name == chk || elems[i].name == chk + "[]") {
            if (elems[i].checked) return true;
        }
    }
    return false;
};
function toPage(el, pageNo) {
    while (true) {
        el = el.parentNode;
        if (!el) return;
        if (el.tagName == "FORM") break;
    }
    el["pageNo"].value = pageNo;
    el.submit();
}
